using System.Collections.Generic;

namespace Core.GameObjects.Stats
{
    /// <summary>
    /// Manages Stats for Game.  Use to add/remove stats from the game.
    /// Once we have our basic set of stats we won't have to worry about adding or removing, except adding
    /// the existing ones at startup, and maybe in the editor.
    /// </summary>
    public static class StatManager
    {
        public static List<Stat> Stats { get { return _Stats; } set { _Stats = value; } }

        private static List<Stat> _Stats = new List<Stat>();

        public static int NextStatID { get { return _NextStatID + 1; } set { _NextStatID = value; } }

        private static int _NextStatID = 0;

        public static Stat GetStat(int id)
        {
            foreach (Stat stat in _Stats)
            {
                if (stat.ID == id)
                    return stat;
                break;
            }

            return null;
        }
    }
}
